<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Basic Configuration Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__ctb__functions__basic.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Basic Configuration Functions<div class="ingroups"><a class="el" href="group__group__ctb.html">CTB          (Continuous Time Block)</a> &raquo; <a class="el" href="group__group__ctb__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>This set of functions are for configuring basic usage of the CTB. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga89c787c0c65e6a19106e5c0e584821e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__basic.html#ga89c787c0c65e6a19106e5c0e584821e7">Cy_CTB_SetDeepSleepMode</a> (<a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#gae394b9178fb8507bdc58838cb0bcadc9">cy_en_ctb_deep_sleep_t</a> deepSleep)</td></tr>
<tr class="memdesc:ga89c787c0c65e6a19106e5c0e584821e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable the entire CTB (not per opamp) in Deep Sleep mode.  <a href="#ga89c787c0c65e6a19106e5c0e584821e7">More...</a><br /></td></tr>
<tr class="separator:ga89c787c0c65e6a19106e5c0e584821e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab2ab23b563a3e9b56a3bbc9166aa6540"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__basic.html#gab2ab23b563a3e9b56a3bbc9166aa6540">Cy_CTB_SetOutputMode</a> (<a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> opampNum, <a class="el" href="group__group__ctb__enums.html#gad4b99429b5ed1561e1b82bb7a21d9e79">cy_en_ctb_mode_t</a> <a class="el" href="group__group__ipc__bt__data__structures.html#ga37e90f5e3bd99fac2021fb3a326607d4">mode</a>)</td></tr>
<tr class="memdesc:gab2ab23b563a3e9b56a3bbc9166aa6540"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the opamp output mode to 1x drive, 10x drive, or comparator mode.  <a href="#gab2ab23b563a3e9b56a3bbc9166aa6540">More...</a><br /></td></tr>
<tr class="separator:gab2ab23b563a3e9b56a3bbc9166aa6540"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab7af2b78c129d7e47bdea09cfa3a0961"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctb__functions__basic.html#gab7af2b78c129d7e47bdea09cfa3a0961">Cy_CTB_SetPower</a> (<a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *base, <a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a> opampNum, <a class="el" href="group__group__ctb__enums.html#ga9cbeea246fe4162a2d4d7be689e807c7">cy_en_ctb_power_t</a> power, <a class="el" href="group__group__ctb__enums.html#ga8517634c935bde4de8ccce97aa1e21f4">cy_en_ctb_pump_t</a> pump)</td></tr>
<tr class="memdesc:gab7af2b78c129d7e47bdea09cfa3a0961"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the power level and charge pump for a specific opamp.  <a href="#gab7af2b78c129d7e47bdea09cfa3a0961">More...</a><br /></td></tr>
<tr class="separator:gab7af2b78c129d7e47bdea09cfa3a0961"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga89c787c0c65e6a19106e5c0e584821e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga89c787c0c65e6a19106e5c0e584821e7">&#9670;&nbsp;</a></span>Cy_CTB_SetDeepSleepMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CTB_SetDeepSleepMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#gae394b9178fb8507bdc58838cb0bcadc9">cy_en_ctb_deep_sleep_t</a>&#160;</td>
          <td class="paramname"><em>deepSleep</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable or disable the entire CTB (not per opamp) in Deep Sleep mode. </p>
<p>If enabled, the AREF block must also be enabled for Deep Sleep to provide the needed reference currents to the opamps (see <a class="el" href="group__group__sysanalog__functions.html#ga5d6d537beaf82fddf8e06f30b1d308b3">Cy_SysAnalog_SetDeepSleepMode</a>). Additionally, ensure that only internal CTB switches are used for routing. Switches on AMUXBUSA and AMUXBUSB are not enabled in Deep Sleep. See the <a class="el" href="group__group__ctb.html#group_ctb_dependencies">Configuration Dependencies</a> section for more information.</p>
<dl class="section note"><dt>Note</dt><dd>In Deep Sleep mode, the charge pumps are disabled so the input range of the opamps is reduced to 0 V to VDDA - 1.5 V.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">deepSleep</td><td><a class="el" href="group__group__ctb__enums.html#ggae394b9178fb8507bdc58838cb0bcadc9a5191cfd1c0e9412bc23ad6e38c69057c">CY_CTB_DEEPSLEEP_DISABLE</a> or <a class="el" href="group__group__ctb__enums.html#ggae394b9178fb8507bdc58838cb0bcadc9a99a9612080a1fd52b1d7b661b11730b9">CY_CTB_DEEPSLEEP_ENABLE</a> from <a class="el" href="group__group__ctb__enums.html#gae394b9178fb8507bdc58838cb0bcadc9">cy_en_ctb_deep_sleep_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    </div><div class="line">    <span class="comment">/* Scenario: The opamps are no longer needed to function in Deep Sleep mode</span></div><div class="line"><span class="comment">     * so disable Deep Sleep operation. */</span></div><div class="line"></div><div class="line">    <a class="code" href="group__group__ctb__functions__basic.html#ga89c787c0c65e6a19106e5c0e584821e7">Cy_CTB_SetDeepSleepMode</a>(CTBM0, <a class="code" href="group__group__ctb__enums.html#ggae394b9178fb8507bdc58838cb0bcadc9a5191cfd1c0e9412bc23ad6e38c69057c">CY_CTB_DEEPSLEEP_DISABLE</a>);</div><div class="line">    </div><div class="line">    <span class="comment">/* This is a low level function that only configures the CTB block.</span></div><div class="line"><span class="comment">     * The preferred method is the Cy_CTB_SetCurrentMode() as it is a high</span></div><div class="line"><span class="comment">     * level function that configures both the CTB and the AREF block. */</span></div><div class="line">    </div></div><!-- fragment -->
</div>
</div>
<a id="gab2ab23b563a3e9b56a3bbc9166aa6540"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab2ab23b563a3e9b56a3bbc9166aa6540">&#9670;&nbsp;</a></span>Cy_CTB_SetOutputMode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CTB_SetOutputMode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>opampNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#gad4b99429b5ed1561e1b82bb7a21d9e79">cy_en_ctb_mode_t</a>&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the opamp output mode to 1x drive, 10x drive, or comparator mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">opampNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a></td></tr>
    <tr><td class="paramname">mode</td><td>Opamp mode selection. Select a value from <a class="el" href="group__group__ctb__enums.html#gad4b99429b5ed1561e1b82bb7a21d9e79">cy_en_ctb_mode_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: Start using Opamp0 as a comparator instead of an opamp by</span></div><div class="line"><span class="comment">     * turning off the 1x and 10x output stages. The comparator functionality</span></div><div class="line"><span class="comment">     * has already been configured with Cy_CTB_CompSetConfig() or during initialization. */</span></div><div class="line">    <a class="code" href="group__group__ctb__functions__basic.html#gab2ab23b563a3e9b56a3bbc9166aa6540">Cy_CTB_SetOutputMode</a>(CTBM0, <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, CY_CTB_MODE_COMP);</div><div class="line">    </div></div><!-- fragment -->
</div>
</div>
<a id="gab7af2b78c129d7e47bdea09cfa3a0961"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab7af2b78c129d7e47bdea09cfa3a0961">&#9670;&nbsp;</a></span>Cy_CTB_SetPower()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Cy_CTB_SetPower </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_b_m___type.html">CTBM_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga2175f16ceffc2774b50643be95f32137">cy_en_ctb_opamp_sel_t</a>&#160;</td>
          <td class="paramname"><em>opampNum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga9cbeea246fe4162a2d4d7be689e807c7">cy_en_ctb_power_t</a>&#160;</td>
          <td class="paramname"><em>power</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__ctb__enums.html#ga8517634c935bde4de8ccce97aa1e21f4">cy_en_ctb_pump_t</a>&#160;</td>
          <td class="paramname"><em>pump</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure the power level and charge pump for a specific opamp. </p>
<p>At higher power levels, the opamp consumes more current but provides more gain bandwidth. Enabling the charge pump increases current but provides rail-to-rail input range. Disabling the charge pump limits the input range to VDDA - 1.5 V. See the device datasheet for performance specifications.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">opampNum</td><td><a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, or <a class="el" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a4c859afffdcf6dcf16c4350906759488">CY_CTB_OPAMP_BOTH</a></td></tr>
    <tr><td class="paramname">power</td><td>Power mode selection. Select a value from <a class="el" href="group__group__ctb__enums.html#ga9cbeea246fe4162a2d4d7be689e807c7">cy_en_ctb_power_t</a>.</td></tr>
    <tr><td class="paramname">pump</td><td>Enable or disable the charge pump. Select a value from <a class="el" href="group__group__ctb__enums.html#ga8517634c935bde4de8ccce97aa1e21f4">cy_en_ctb_pump_t</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: Opamp0 is no longer needed so turn it off to save power. </span></div><div class="line"><span class="comment">     * Opamp1 is still being used but the full input range and bandwidth is not needed</span></div><div class="line"><span class="comment">     * so turn off the charge pump and reduce the power level to medium to save power. */</span></div><div class="line">    </div><div class="line">    <a class="code" href="group__group__ctb__functions__basic.html#gab7af2b78c129d7e47bdea09cfa3a0961">Cy_CTB_SetPower</a>(CTBM0, <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a715789db816ed8db3729da6e57aacdcb">CY_CTB_OPAMP_0</a>, <a class="code" href="group__group__ctb__enums.html#gga9cbeea246fe4162a2d4d7be689e807c7a66abce3441d5fa21de57a3562618699d">CY_CTB_POWER_OFF</a>, <a class="code" href="group__group__ctb__enums.html#gga8517634c935bde4de8ccce97aa1e21f4aad97b2c096dea3320c4167a4989626ee">CY_CTB_PUMP_DISABLE</a>);</div><div class="line">    <a class="code" href="group__group__ctb__functions__basic.html#gab7af2b78c129d7e47bdea09cfa3a0961">Cy_CTB_SetPower</a>(CTBM0, <a class="code" href="group__group__ctb__enums.html#gga2175f16ceffc2774b50643be95f32137a9318dd62afb23fc0c4dac2abcfcea5f0">CY_CTB_OPAMP_1</a>, CY_CTB_POWER_MEDIUM, <a class="code" href="group__group__ctb__enums.html#gga8517634c935bde4de8ccce97aa1e21f4aad97b2c096dea3320c4167a4989626ee">CY_CTB_PUMP_DISABLE</a>);</div></div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
